/*
 * Copyright (C) 2021 Realtek Semiconductor Corp.
 * All Rights Reserved.
 *
 * This program is the proprietary software of Realtek Semiconductor
 * Corporation and/or its licensors, and only be used, duplicated,
 * modified or distributed under the authorized license from Realtek.
 *
 * ANY USE OF THE SOFTWARE OTHER THAN AS AUTHORIZED UNDER
 * THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.
 *
 * Purpose : Definition of ME handler: NU dynamic power management control (336)
 *
 * Feature : The file includes the following modules and sub-modules
 *           (1) ME handler: NU dynamic power management control (336)
 */

#include "app_basic.h"
#include "feature_mgmt.h"


MIB_TABLE_INFO_T gMibOnuDynaPwrMgmtCtrlTableInfo;
MIB_ATTR_INFO_T  gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_ATTR_NUM];
MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_T gMibOnuDynaPwrMgmtCtrlDefRow;
MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_T gMibOnuDynaPwrMgmtCtrl2014DefRow;
MIB_TABLE_OPER_T gMibOnuDynaPwrMgmtCtrlOper;

UINT8 omccVer = 0x80;

GOS_ERROR_CODE OnuDynaPwrMgmtCtrlDrvCfg(void* pOldRow, void* pNewRow, MIB_OPERA_TYPE operationType, MIB_ATTRS_SET attrSet, UINT32 pri)
{
    GOS_ERROR_CODE                     ret = GOS_OK;
#if 0
    MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_T *pNewMibPwrMgmtCtrl = NULL;
    MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_T *pOldMibPwrMgmtCtrl = NULL;
    MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_T *pNewMibPwrMgmtCtrl2014 = NULL;
    MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_T *pOldMibPwrMgmtCtrl2014 = NULL;

    ret = GOS_OK;
    if(omccVer == 0xb4) /*G.988 2014 version*/
    {
        pNewMibPwrMgmtCtrl2014 = (MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_T *)pNewRow;
        pOldMibPwrMgmtCtrl2014 = (MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_T *)pOldRow;

        switch (operationType)
        {
            case MIB_SET:
                break;
            default:
                break;
        }
    }
    else
    {
        pNewMibPwrMgmtCtrl = (MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_T *)pNewRow;
        pOldMibPwrMgmtCtrl = (MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_T *)pOldRow;
        switch (operationType)
        {
            case MIB_SET:
                break;
            default:
                break;
        }
    }
#endif

    return ret;
}


GOS_ERROR_CODE mibTable_init(MIB_TABLE_INDEX tableId)
{
    char value[256]={0};
    if (GOS_OK == omci_get_boa_mib_value_by_name("OMCC_VER",value))
    {
        if(strcmp(value,"180") == 0)
            omccVer = 0xb4;
    }
    gMibOnuDynaPwrMgmtCtrlTableInfo.Name = "OnuDynaPwrMgmtCtrl";
    gMibOnuDynaPwrMgmtCtrlTableInfo.ShortName = "OnuDynaPwrMgmtCtrl";
    gMibOnuDynaPwrMgmtCtrlTableInfo.Desc = "ONU dynamic power management control";
    gMibOnuDynaPwrMgmtCtrlTableInfo.ClassId = (UINT32)(OMCI_ME_CLASS_ONU_DYNA_PWR_MGMT_CTRL);
    gMibOnuDynaPwrMgmtCtrlTableInfo.InitType = (UINT32)(OMCI_ME_INIT_TYPE_ONU);
    gMibOnuDynaPwrMgmtCtrlTableInfo.StdType = (UINT32)(OMCI_ME_TYPE_STANDARD);
    gMibOnuDynaPwrMgmtCtrlTableInfo.ActionType = (UINT32)(OMCI_ME_ACTION_SET | OMCI_ME_ACTION_GET);
    gMibOnuDynaPwrMgmtCtrlTableInfo.pAttributes = &(gMibOnuDynaPwrMgmtCtrlAttrInfo[0]);
    if(omccVer == 0xb4) /*G.988 2014 version*/
    {
        gMibOnuDynaPwrMgmtCtrlTableInfo.attrNum = MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_ATTR_NUM;
        gMibOnuDynaPwrMgmtCtrlTableInfo.entrySize = sizeof(MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_T);
        gMibOnuDynaPwrMgmtCtrlTableInfo.pDefaultRow = &gMibOnuDynaPwrMgmtCtrl2014DefRow;
        
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_ENTITY_ID_INDEX  - MIB_TABLE_FIRST_INDEX].Name = "EntityId";
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_PWR_REDUCTION_MGMT_CAPABILITY_INDEX  - MIB_TABLE_FIRST_INDEX].Name = "PwrReductionMgmtCapability";
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_PWR_REDUCTION_MGMT_MODE_INDEX    - MIB_TABLE_FIRST_INDEX].Name = "PwrReductionMgmtMode";
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_ITRANSINIT_INDEX  - MIB_TABLE_FIRST_INDEX].Name = "Itransinit";
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_ITXINIT_INDEX    - MIB_TABLE_FIRST_INDEX].Name = "Itxinit";
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_MAX_SLEEP_INTERVAL_INDEX  - MIB_TABLE_FIRST_INDEX].Name = "MaxSleepInterval";
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_MAX_RECEVER_OFF_INTERVAL_INDEX  - MIB_TABLE_FIRST_INDEX].Name = "MaxReceiverOffInterval";
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_MIN_AWARE_INTERVAL_INDEX    - MIB_TABLE_FIRST_INDEX].Name = "MinAwareInterval";
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_MIN_ACTIVE_HELD_INTERVAL_INDEX   - MIB_TABLE_FIRST_INDEX].Name = "MinActiveHeldInterval";
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_MAX_SLEEP_INTERVAL_EXTENSION_INDEX   - MIB_TABLE_FIRST_INDEX].Name = "MaxSleepIntervalExtension";
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_EPON_CAPABILITY_EXTENSION_INDEX   - MIB_TABLE_FIRST_INDEX].Name = "EponCapabilityExtension";
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_EPON_SETUP_EXTENSION_INDEX   - MIB_TABLE_FIRST_INDEX].Name = "EponSetupExtenstion";
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_MISSING_CONSECUTIVE_BURSTS_THRESHOLD_INDEX   - MIB_TABLE_FIRST_INDEX].Name = "MissingConsecutiveBurstsThreshold";

        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_ENTITY_ID_INDEX  - MIB_TABLE_FIRST_INDEX].Desc = "Entity ID";
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_PWR_REDUCTION_MGMT_CAPABILITY_INDEX  - MIB_TABLE_FIRST_INDEX].Desc = "Power reduction management capability";
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_PWR_REDUCTION_MGMT_MODE_INDEX    - MIB_TABLE_FIRST_INDEX].Desc = "Power reduction management mode";
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_ITRANSINIT_INDEX  - MIB_TABLE_FIRST_INDEX].Desc = "Itransinit";
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_ITXINIT_INDEX    - MIB_TABLE_FIRST_INDEX].Desc = "Itxinit";
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_MAX_SLEEP_INTERVAL_INDEX  - MIB_TABLE_FIRST_INDEX].Desc = "Maximum sleep interval";
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_MAX_RECEVER_OFF_INTERVAL_INDEX  - MIB_TABLE_FIRST_INDEX].Desc = "Maximum receiver-off interval";
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_MIN_AWARE_INTERVAL_INDEX    - MIB_TABLE_FIRST_INDEX].Desc = "Minimum aware interval";
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_MIN_ACTIVE_HELD_INTERVAL_INDEX   - MIB_TABLE_FIRST_INDEX].Desc = "Minimum active held interval";
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_MAX_SLEEP_INTERVAL_EXTENSION_INDEX   - MIB_TABLE_FIRST_INDEX].Desc = "Maximum sleep interval extension";
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_EPON_CAPABILITY_EXTENSION_INDEX   - MIB_TABLE_FIRST_INDEX].Desc = "EPON capability extension";
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_EPON_SETUP_EXTENSION_INDEX   - MIB_TABLE_FIRST_INDEX].Desc = "EPON setup extension";
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_MISSING_CONSECUTIVE_BURSTS_THRESHOLD_INDEX   - MIB_TABLE_FIRST_INDEX].Desc = "Missing consecutive bursts threshold";

        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_ENTITY_ID_INDEX  - MIB_TABLE_FIRST_INDEX].DataType = MIB_ATTR_TYPE_UINT16;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_PWR_REDUCTION_MGMT_CAPABILITY_INDEX  - MIB_TABLE_FIRST_INDEX].DataType = MIB_ATTR_TYPE_UINT8;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_PWR_REDUCTION_MGMT_MODE_INDEX    - MIB_TABLE_FIRST_INDEX].DataType = MIB_ATTR_TYPE_UINT8;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_ITRANSINIT_INDEX  - MIB_TABLE_FIRST_INDEX].DataType = MIB_ATTR_TYPE_UINT16;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_ITXINIT_INDEX    - MIB_TABLE_FIRST_INDEX].DataType = MIB_ATTR_TYPE_UINT16;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_MAX_SLEEP_INTERVAL_INDEX  - MIB_TABLE_FIRST_INDEX].DataType = MIB_ATTR_TYPE_UINT32;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_MAX_RECEVER_OFF_INTERVAL_INDEX  - MIB_TABLE_FIRST_INDEX].DataType = MIB_ATTR_TYPE_UINT32;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_MIN_AWARE_INTERVAL_INDEX    - MIB_TABLE_FIRST_INDEX].DataType = MIB_ATTR_TYPE_UINT32;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_MIN_ACTIVE_HELD_INTERVAL_INDEX   - MIB_TABLE_FIRST_INDEX].DataType = MIB_ATTR_TYPE_UINT16;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_MAX_SLEEP_INTERVAL_EXTENSION_INDEX   - MIB_TABLE_FIRST_INDEX].DataType = MIB_ATTR_TYPE_UINT64;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_EPON_CAPABILITY_EXTENSION_INDEX   - MIB_TABLE_FIRST_INDEX].DataType = MIB_ATTR_TYPE_UINT8;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_EPON_SETUP_EXTENSION_INDEX   - MIB_TABLE_FIRST_INDEX].DataType = MIB_ATTR_TYPE_UINT8;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_MISSING_CONSECUTIVE_BURSTS_THRESHOLD_INDEX   - MIB_TABLE_FIRST_INDEX].DataType = MIB_ATTR_TYPE_UINT32;

        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_ENTITY_ID_INDEX  - MIB_TABLE_FIRST_INDEX].Len = 2;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_PWR_REDUCTION_MGMT_CAPABILITY_INDEX  - MIB_TABLE_FIRST_INDEX].Len = 1;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_PWR_REDUCTION_MGMT_MODE_INDEX    - MIB_TABLE_FIRST_INDEX].Len = 1;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_ITRANSINIT_INDEX  - MIB_TABLE_FIRST_INDEX].Len = 2;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_ITXINIT_INDEX    - MIB_TABLE_FIRST_INDEX].Len = 2;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_MAX_SLEEP_INTERVAL_INDEX  - MIB_TABLE_FIRST_INDEX].Len = 4;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_MAX_RECEVER_OFF_INTERVAL_INDEX  - MIB_TABLE_FIRST_INDEX].Len = 4;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_MIN_AWARE_INTERVAL_INDEX    - MIB_TABLE_FIRST_INDEX].Len = 4;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_MIN_ACTIVE_HELD_INTERVAL_INDEX   - MIB_TABLE_FIRST_INDEX].Len = 2;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_MAX_SLEEP_INTERVAL_EXTENSION_INDEX   - MIB_TABLE_FIRST_INDEX].Len = 8;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_EPON_CAPABILITY_EXTENSION_INDEX   - MIB_TABLE_FIRST_INDEX].Len = 1;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_EPON_SETUP_EXTENSION_INDEX   - MIB_TABLE_FIRST_INDEX].Len = 1;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_MISSING_CONSECUTIVE_BURSTS_THRESHOLD_INDEX   - MIB_TABLE_FIRST_INDEX].Len = 4;

        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_ENTITY_ID_INDEX  - MIB_TABLE_FIRST_INDEX].IsIndex = TRUE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_PWR_REDUCTION_MGMT_CAPABILITY_INDEX  - MIB_TABLE_FIRST_INDEX].IsIndex = FALSE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_PWR_REDUCTION_MGMT_MODE_INDEX    - MIB_TABLE_FIRST_INDEX].IsIndex = FALSE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_ITRANSINIT_INDEX  - MIB_TABLE_FIRST_INDEX].IsIndex = FALSE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_ITXINIT_INDEX    - MIB_TABLE_FIRST_INDEX].IsIndex = FALSE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_MAX_SLEEP_INTERVAL_INDEX  - MIB_TABLE_FIRST_INDEX].IsIndex = FALSE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_MAX_RECEVER_OFF_INTERVAL_INDEX  - MIB_TABLE_FIRST_INDEX].IsIndex = FALSE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_MIN_AWARE_INTERVAL_INDEX    - MIB_TABLE_FIRST_INDEX].IsIndex = FALSE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_MIN_ACTIVE_HELD_INTERVAL_INDEX   - MIB_TABLE_FIRST_INDEX].IsIndex = FALSE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_MAX_SLEEP_INTERVAL_EXTENSION_INDEX   - MIB_TABLE_FIRST_INDEX].IsIndex = FALSE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_EPON_CAPABILITY_EXTENSION_INDEX   - MIB_TABLE_FIRST_INDEX].IsIndex = FALSE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_EPON_SETUP_EXTENSION_INDEX   - MIB_TABLE_FIRST_INDEX].IsIndex = FALSE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_MISSING_CONSECUTIVE_BURSTS_THRESHOLD_INDEX   - MIB_TABLE_FIRST_INDEX].IsIndex = FALSE;

        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_ENTITY_ID_INDEX  - MIB_TABLE_FIRST_INDEX].MibSave = TRUE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_PWR_REDUCTION_MGMT_CAPABILITY_INDEX  - MIB_TABLE_FIRST_INDEX].MibSave = TRUE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_PWR_REDUCTION_MGMT_MODE_INDEX    - MIB_TABLE_FIRST_INDEX].MibSave = TRUE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_ITRANSINIT_INDEX  - MIB_TABLE_FIRST_INDEX].MibSave = TRUE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_ITXINIT_INDEX    - MIB_TABLE_FIRST_INDEX].MibSave = TRUE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_MAX_SLEEP_INTERVAL_INDEX  - MIB_TABLE_FIRST_INDEX].MibSave = TRUE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_MAX_RECEVER_OFF_INTERVAL_INDEX  - MIB_TABLE_FIRST_INDEX].MibSave = TRUE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_MIN_AWARE_INTERVAL_INDEX    - MIB_TABLE_FIRST_INDEX].MibSave = TRUE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_MIN_ACTIVE_HELD_INTERVAL_INDEX   - MIB_TABLE_FIRST_INDEX].MibSave = TRUE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_MAX_SLEEP_INTERVAL_EXTENSION_INDEX   - MIB_TABLE_FIRST_INDEX].MibSave = TRUE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_EPON_CAPABILITY_EXTENSION_INDEX   - MIB_TABLE_FIRST_INDEX].MibSave = TRUE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_EPON_SETUP_EXTENSION_INDEX   - MIB_TABLE_FIRST_INDEX].MibSave = TRUE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_MISSING_CONSECUTIVE_BURSTS_THRESHOLD_INDEX   - MIB_TABLE_FIRST_INDEX].MibSave = TRUE;

        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_ENTITY_ID_INDEX  - MIB_TABLE_FIRST_INDEX].OutStyle = MIB_ATTR_OUT_HEX;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_PWR_REDUCTION_MGMT_CAPABILITY_INDEX  - MIB_TABLE_FIRST_INDEX].OutStyle = MIB_ATTR_OUT_HEX;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_PWR_REDUCTION_MGMT_MODE_INDEX    - MIB_TABLE_FIRST_INDEX].OutStyle = MIB_ATTR_OUT_HEX;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_ITRANSINIT_INDEX  - MIB_TABLE_FIRST_INDEX].OutStyle = MIB_ATTR_OUT_DEC;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_ITXINIT_INDEX    - MIB_TABLE_FIRST_INDEX].OutStyle = MIB_ATTR_OUT_DEC;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_MAX_SLEEP_INTERVAL_INDEX  - MIB_TABLE_FIRST_INDEX].OutStyle = MIB_ATTR_OUT_DEC;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_MAX_RECEVER_OFF_INTERVAL_INDEX  - MIB_TABLE_FIRST_INDEX].OutStyle = MIB_ATTR_OUT_DEC;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_MIN_AWARE_INTERVAL_INDEX    - MIB_TABLE_FIRST_INDEX].OutStyle = MIB_ATTR_OUT_DEC;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_MIN_ACTIVE_HELD_INTERVAL_INDEX   - MIB_TABLE_FIRST_INDEX].OutStyle = MIB_ATTR_OUT_DEC;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_MAX_SLEEP_INTERVAL_EXTENSION_INDEX   - MIB_TABLE_FIRST_INDEX].OutStyle = MIB_ATTR_OUT_DEC;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_EPON_CAPABILITY_EXTENSION_INDEX   - MIB_TABLE_FIRST_INDEX].OutStyle = MIB_ATTR_OUT_DEC;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_EPON_SETUP_EXTENSION_INDEX   - MIB_TABLE_FIRST_INDEX].OutStyle = MIB_ATTR_OUT_DEC;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_MISSING_CONSECUTIVE_BURSTS_THRESHOLD_INDEX   - MIB_TABLE_FIRST_INDEX].OutStyle = MIB_ATTR_OUT_DEC;

        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_ENTITY_ID_INDEX  - MIB_TABLE_FIRST_INDEX].OltAcc = OMCI_ME_ATTR_ACCESS_READ;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_PWR_REDUCTION_MGMT_CAPABILITY_INDEX  - MIB_TABLE_FIRST_INDEX].OltAcc = OMCI_ME_ATTR_ACCESS_READ;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_PWR_REDUCTION_MGMT_MODE_INDEX    - MIB_TABLE_FIRST_INDEX].OltAcc = OMCI_ME_ATTR_ACCESS_READ | OMCI_ME_ATTR_ACCESS_WRITE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_ITRANSINIT_INDEX  - MIB_TABLE_FIRST_INDEX].OltAcc = OMCI_ME_ATTR_ACCESS_READ;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_ITXINIT_INDEX    - MIB_TABLE_FIRST_INDEX].OltAcc = OMCI_ME_ATTR_ACCESS_READ;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_MAX_SLEEP_INTERVAL_INDEX  - MIB_TABLE_FIRST_INDEX].OltAcc = OMCI_ME_ATTR_ACCESS_READ | OMCI_ME_ATTR_ACCESS_WRITE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_MAX_RECEVER_OFF_INTERVAL_INDEX  - MIB_TABLE_FIRST_INDEX].OltAcc = OMCI_ME_ATTR_ACCESS_READ | OMCI_ME_ATTR_ACCESS_WRITE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_MIN_AWARE_INTERVAL_INDEX    - MIB_TABLE_FIRST_INDEX].OltAcc = OMCI_ME_ATTR_ACCESS_READ | OMCI_ME_ATTR_ACCESS_WRITE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_MIN_ACTIVE_HELD_INTERVAL_INDEX   - MIB_TABLE_FIRST_INDEX].OltAcc = OMCI_ME_ATTR_ACCESS_READ | OMCI_ME_ATTR_ACCESS_WRITE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_MAX_SLEEP_INTERVAL_EXTENSION_INDEX   - MIB_TABLE_FIRST_INDEX].OltAcc = OMCI_ME_ATTR_ACCESS_READ | OMCI_ME_ATTR_ACCESS_WRITE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_EPON_CAPABILITY_EXTENSION_INDEX   - MIB_TABLE_FIRST_INDEX].OltAcc = OMCI_ME_ATTR_ACCESS_READ;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_EPON_SETUP_EXTENSION_INDEX   - MIB_TABLE_FIRST_INDEX].OltAcc = OMCI_ME_ATTR_ACCESS_READ | OMCI_ME_ATTR_ACCESS_WRITE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_MISSING_CONSECUTIVE_BURSTS_THRESHOLD_INDEX   - MIB_TABLE_FIRST_INDEX].OltAcc = OMCI_ME_ATTR_ACCESS_READ | OMCI_ME_ATTR_ACCESS_WRITE;

        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_ENTITY_ID_INDEX  - MIB_TABLE_FIRST_INDEX].AvcFlag = FALSE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_PWR_REDUCTION_MGMT_CAPABILITY_INDEX  - MIB_TABLE_FIRST_INDEX].AvcFlag = FALSE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_PWR_REDUCTION_MGMT_MODE_INDEX    - MIB_TABLE_FIRST_INDEX].AvcFlag = FALSE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_ITRANSINIT_INDEX  - MIB_TABLE_FIRST_INDEX].AvcFlag = FALSE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_ITXINIT_INDEX    - MIB_TABLE_FIRST_INDEX].AvcFlag = FALSE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_MAX_SLEEP_INTERVAL_INDEX  - MIB_TABLE_FIRST_INDEX].AvcFlag = FALSE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_MAX_RECEVER_OFF_INTERVAL_INDEX  - MIB_TABLE_FIRST_INDEX].AvcFlag = FALSE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_MIN_AWARE_INTERVAL_INDEX    - MIB_TABLE_FIRST_INDEX].AvcFlag = FALSE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_MIN_ACTIVE_HELD_INTERVAL_INDEX   - MIB_TABLE_FIRST_INDEX].AvcFlag = FALSE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_MAX_SLEEP_INTERVAL_EXTENSION_INDEX   - MIB_TABLE_FIRST_INDEX].AvcFlag = FALSE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_EPON_CAPABILITY_EXTENSION_INDEX   - MIB_TABLE_FIRST_INDEX].AvcFlag = FALSE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_EPON_SETUP_EXTENSION_INDEX   - MIB_TABLE_FIRST_INDEX].AvcFlag = FALSE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_MISSING_CONSECUTIVE_BURSTS_THRESHOLD_INDEX   - MIB_TABLE_FIRST_INDEX].AvcFlag = FALSE;

        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_ENTITY_ID_INDEX  - MIB_TABLE_FIRST_INDEX].OptionType = OMCI_ME_ATTR_TYPE_MANDATORY;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_PWR_REDUCTION_MGMT_CAPABILITY_INDEX  - MIB_TABLE_FIRST_INDEX].OptionType = OMCI_ME_ATTR_TYPE_MANDATORY;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_PWR_REDUCTION_MGMT_MODE_INDEX    - MIB_TABLE_FIRST_INDEX].OptionType = OMCI_ME_ATTR_TYPE_MANDATORY;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_ITRANSINIT_INDEX  - MIB_TABLE_FIRST_INDEX].OptionType = OMCI_ME_ATTR_TYPE_MANDATORY;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_ITXINIT_INDEX    - MIB_TABLE_FIRST_INDEX].OptionType = OMCI_ME_ATTR_TYPE_MANDATORY;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_MAX_SLEEP_INTERVAL_INDEX  - MIB_TABLE_FIRST_INDEX].OptionType = OMCI_ME_ATTR_TYPE_MANDATORY;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_MAX_RECEVER_OFF_INTERVAL_INDEX  - MIB_TABLE_FIRST_INDEX].OptionType = OMCI_ME_ATTR_TYPE_MANDATORY;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_MIN_AWARE_INTERVAL_INDEX    - MIB_TABLE_FIRST_INDEX].OptionType = OMCI_ME_ATTR_TYPE_MANDATORY;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_MIN_ACTIVE_HELD_INTERVAL_INDEX   - MIB_TABLE_FIRST_INDEX].OptionType = OMCI_ME_ATTR_TYPE_MANDATORY;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_MAX_SLEEP_INTERVAL_EXTENSION_INDEX   - MIB_TABLE_FIRST_INDEX].OptionType = OMCI_ME_ATTR_TYPE_OPTIONAL;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_EPON_CAPABILITY_EXTENSION_INDEX   - MIB_TABLE_FIRST_INDEX].OptionType = OMCI_ME_ATTR_TYPE_OPTIONAL;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_EPON_SETUP_EXTENSION_INDEX   - MIB_TABLE_FIRST_INDEX].OptionType = OMCI_ME_ATTR_TYPE_OPTIONAL;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_2014_MISSING_CONSECUTIVE_BURSTS_THRESHOLD_INDEX   - MIB_TABLE_FIRST_INDEX].OptionType = OMCI_ME_ATTR_TYPE_MANDATORY;
    }
    else
    {
        gMibOnuDynaPwrMgmtCtrlTableInfo.attrNum = MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_ATTR_NUM;
        gMibOnuDynaPwrMgmtCtrlTableInfo.entrySize = sizeof(MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_T);
        gMibOnuDynaPwrMgmtCtrlTableInfo.pDefaultRow = &gMibOnuDynaPwrMgmtCtrlDefRow;

        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_ENTITY_ID_INDEX  - MIB_TABLE_FIRST_INDEX].Name = "EntityId";
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_PWR_REDUCTION_MGMT_CAPABILITY_INDEX  - MIB_TABLE_FIRST_INDEX].Name = "PwrReductionMgmtCapability";
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_PWR_REDUCTION_MGMT_MODE_INDEX  - MIB_TABLE_FIRST_INDEX].Name = "PwrReductionMgmtMode";
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_ITRANSINIT_INDEX  - MIB_TABLE_FIRST_INDEX].Name = "Itransinit";
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_ITXINIT_INDEX  - MIB_TABLE_FIRST_INDEX].Name = "Itxinit";
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_MAX_SLEEP_INTERVAL_INDEX  - MIB_TABLE_FIRST_INDEX].Name = "MaxSleepInterval";
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_MIN_AWARE_INTERVAL_INDEX   - MIB_TABLE_FIRST_INDEX].Name = "MinAwareInterval";
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_MIN_ACTIVE_HELD_INTERVAL_INDEX     - MIB_TABLE_FIRST_INDEX].Name = "MinActiveHeldInterval";
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_MAX_SLEEP_INTERVAL_EXTENSION_INDEX     - MIB_TABLE_FIRST_INDEX].Name = "MaxSleepIntervalExtension";

        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_ENTITY_ID_INDEX  - MIB_TABLE_FIRST_INDEX].Desc = "Entity ID";
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_PWR_REDUCTION_MGMT_CAPABILITY_INDEX  - MIB_TABLE_FIRST_INDEX].Desc = "Power reduction management capability";
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_PWR_REDUCTION_MGMT_MODE_INDEX  - MIB_TABLE_FIRST_INDEX].Desc = "Power reduction management mode";
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_ITRANSINIT_INDEX  - MIB_TABLE_FIRST_INDEX].Desc = "Itransinit";
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_ITXINIT_INDEX  - MIB_TABLE_FIRST_INDEX].Desc = "Itxinit";
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_MAX_SLEEP_INTERVAL_INDEX  - MIB_TABLE_FIRST_INDEX].Desc = "Maximum sleep interval";
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_MIN_AWARE_INTERVAL_INDEX   - MIB_TABLE_FIRST_INDEX].Desc = "Minimum aware interval";
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_MIN_ACTIVE_HELD_INTERVAL_INDEX     - MIB_TABLE_FIRST_INDEX].Desc = "Minimum active held interval";
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_MAX_SLEEP_INTERVAL_EXTENSION_INDEX     - MIB_TABLE_FIRST_INDEX].Desc = "Maximum sleep interval extension";

        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_ENTITY_ID_INDEX  - MIB_TABLE_FIRST_INDEX].DataType = MIB_ATTR_TYPE_UINT16;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_PWR_REDUCTION_MGMT_CAPABILITY_INDEX  - MIB_TABLE_FIRST_INDEX].DataType = MIB_ATTR_TYPE_UINT8;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_PWR_REDUCTION_MGMT_MODE_INDEX  - MIB_TABLE_FIRST_INDEX].DataType = MIB_ATTR_TYPE_UINT8;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_ITRANSINIT_INDEX  - MIB_TABLE_FIRST_INDEX].DataType = MIB_ATTR_TYPE_UINT16;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_ITXINIT_INDEX  - MIB_TABLE_FIRST_INDEX].DataType = MIB_ATTR_TYPE_UINT16;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_MAX_SLEEP_INTERVAL_INDEX  - MIB_TABLE_FIRST_INDEX].DataType = MIB_ATTR_TYPE_UINT32;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_MIN_AWARE_INTERVAL_INDEX   - MIB_TABLE_FIRST_INDEX].DataType = MIB_ATTR_TYPE_UINT32;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_MIN_ACTIVE_HELD_INTERVAL_INDEX     - MIB_TABLE_FIRST_INDEX].DataType = MIB_ATTR_TYPE_UINT16;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_MAX_SLEEP_INTERVAL_EXTENSION_INDEX     - MIB_TABLE_FIRST_INDEX].DataType = MIB_ATTR_TYPE_UINT64;

        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_ENTITY_ID_INDEX  - MIB_TABLE_FIRST_INDEX].Len = 2;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_PWR_REDUCTION_MGMT_CAPABILITY_INDEX  - MIB_TABLE_FIRST_INDEX].Len = 1;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_PWR_REDUCTION_MGMT_MODE_INDEX  - MIB_TABLE_FIRST_INDEX].Len = 1;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_ITRANSINIT_INDEX  - MIB_TABLE_FIRST_INDEX].Len = 2;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_ITXINIT_INDEX  - MIB_TABLE_FIRST_INDEX].Len = 2;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_MAX_SLEEP_INTERVAL_INDEX  - MIB_TABLE_FIRST_INDEX].Len = 4;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_MIN_AWARE_INTERVAL_INDEX   - MIB_TABLE_FIRST_INDEX].Len = 4;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_MIN_ACTIVE_HELD_INTERVAL_INDEX     - MIB_TABLE_FIRST_INDEX].Len = 2;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_MAX_SLEEP_INTERVAL_EXTENSION_INDEX     - MIB_TABLE_FIRST_INDEX].Len = 8;

        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_ENTITY_ID_INDEX  - MIB_TABLE_FIRST_INDEX].IsIndex = TRUE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_PWR_REDUCTION_MGMT_CAPABILITY_INDEX  - MIB_TABLE_FIRST_INDEX].IsIndex = FALSE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_PWR_REDUCTION_MGMT_MODE_INDEX  - MIB_TABLE_FIRST_INDEX].IsIndex = FALSE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_ITRANSINIT_INDEX  - MIB_TABLE_FIRST_INDEX].IsIndex = FALSE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_ITXINIT_INDEX  - MIB_TABLE_FIRST_INDEX].IsIndex = FALSE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_MAX_SLEEP_INTERVAL_INDEX  - MIB_TABLE_FIRST_INDEX].IsIndex = FALSE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_MIN_AWARE_INTERVAL_INDEX   - MIB_TABLE_FIRST_INDEX].IsIndex = FALSE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_MIN_ACTIVE_HELD_INTERVAL_INDEX     - MIB_TABLE_FIRST_INDEX].IsIndex = FALSE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_MAX_SLEEP_INTERVAL_EXTENSION_INDEX     - MIB_TABLE_FIRST_INDEX].IsIndex = FALSE;

        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_ENTITY_ID_INDEX  - MIB_TABLE_FIRST_INDEX].MibSave = TRUE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_PWR_REDUCTION_MGMT_CAPABILITY_INDEX  - MIB_TABLE_FIRST_INDEX].MibSave = TRUE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_PWR_REDUCTION_MGMT_MODE_INDEX  - MIB_TABLE_FIRST_INDEX].MibSave = TRUE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_ITRANSINIT_INDEX  - MIB_TABLE_FIRST_INDEX].MibSave = TRUE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_ITXINIT_INDEX  - MIB_TABLE_FIRST_INDEX].MibSave = TRUE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_MAX_SLEEP_INTERVAL_INDEX  - MIB_TABLE_FIRST_INDEX].MibSave = TRUE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_MIN_AWARE_INTERVAL_INDEX   - MIB_TABLE_FIRST_INDEX].MibSave = TRUE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_MIN_ACTIVE_HELD_INTERVAL_INDEX     - MIB_TABLE_FIRST_INDEX].MibSave = TRUE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_MAX_SLEEP_INTERVAL_EXTENSION_INDEX     - MIB_TABLE_FIRST_INDEX].MibSave = TRUE;

        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_ENTITY_ID_INDEX  - MIB_TABLE_FIRST_INDEX].OutStyle = MIB_ATTR_OUT_HEX;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_PWR_REDUCTION_MGMT_CAPABILITY_INDEX  - MIB_TABLE_FIRST_INDEX].OutStyle = MIB_ATTR_OUT_HEX;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_PWR_REDUCTION_MGMT_MODE_INDEX  - MIB_TABLE_FIRST_INDEX].OutStyle = MIB_ATTR_OUT_HEX;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_ITRANSINIT_INDEX  - MIB_TABLE_FIRST_INDEX].OutStyle = MIB_ATTR_OUT_DEC;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_ITXINIT_INDEX  - MIB_TABLE_FIRST_INDEX].OutStyle = MIB_ATTR_OUT_DEC;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_MAX_SLEEP_INTERVAL_INDEX  - MIB_TABLE_FIRST_INDEX].OutStyle = MIB_ATTR_OUT_DEC;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_MIN_AWARE_INTERVAL_INDEX   - MIB_TABLE_FIRST_INDEX].OutStyle = MIB_ATTR_OUT_DEC;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_MIN_ACTIVE_HELD_INTERVAL_INDEX     - MIB_TABLE_FIRST_INDEX].OutStyle = MIB_ATTR_OUT_DEC;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_MAX_SLEEP_INTERVAL_EXTENSION_INDEX     - MIB_TABLE_FIRST_INDEX].OutStyle = MIB_ATTR_OUT_DEC;

        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_ENTITY_ID_INDEX  - MIB_TABLE_FIRST_INDEX].OltAcc = OMCI_ME_ATTR_ACCESS_READ;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_PWR_REDUCTION_MGMT_CAPABILITY_INDEX  - MIB_TABLE_FIRST_INDEX].OltAcc = OMCI_ME_ATTR_ACCESS_READ;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_PWR_REDUCTION_MGMT_MODE_INDEX  - MIB_TABLE_FIRST_INDEX].OltAcc = OMCI_ME_ATTR_ACCESS_READ | OMCI_ME_ATTR_ACCESS_WRITE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_ITRANSINIT_INDEX  - MIB_TABLE_FIRST_INDEX].OltAcc = OMCI_ME_ATTR_ACCESS_READ;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_ITXINIT_INDEX  - MIB_TABLE_FIRST_INDEX].OltAcc = OMCI_ME_ATTR_ACCESS_READ;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_MAX_SLEEP_INTERVAL_INDEX  - MIB_TABLE_FIRST_INDEX].OltAcc = OMCI_ME_ATTR_ACCESS_READ | OMCI_ME_ATTR_ACCESS_WRITE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_MIN_AWARE_INTERVAL_INDEX   - MIB_TABLE_FIRST_INDEX].OltAcc = OMCI_ME_ATTR_ACCESS_READ | OMCI_ME_ATTR_ACCESS_WRITE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_MIN_ACTIVE_HELD_INTERVAL_INDEX     - MIB_TABLE_FIRST_INDEX].OltAcc = OMCI_ME_ATTR_ACCESS_READ | OMCI_ME_ATTR_ACCESS_WRITE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_MAX_SLEEP_INTERVAL_EXTENSION_INDEX     - MIB_TABLE_FIRST_INDEX].OltAcc = OMCI_ME_ATTR_ACCESS_READ | OMCI_ME_ATTR_ACCESS_WRITE;

        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_ENTITY_ID_INDEX  - MIB_TABLE_FIRST_INDEX].AvcFlag = FALSE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_PWR_REDUCTION_MGMT_CAPABILITY_INDEX  - MIB_TABLE_FIRST_INDEX].AvcFlag = FALSE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_PWR_REDUCTION_MGMT_MODE_INDEX  - MIB_TABLE_FIRST_INDEX].AvcFlag = FALSE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_ITRANSINIT_INDEX  - MIB_TABLE_FIRST_INDEX].AvcFlag = FALSE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_ITXINIT_INDEX  - MIB_TABLE_FIRST_INDEX].AvcFlag = FALSE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_MAX_SLEEP_INTERVAL_INDEX  - MIB_TABLE_FIRST_INDEX].AvcFlag = FALSE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_MIN_AWARE_INTERVAL_INDEX   - MIB_TABLE_FIRST_INDEX].AvcFlag = FALSE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_MIN_ACTIVE_HELD_INTERVAL_INDEX     - MIB_TABLE_FIRST_INDEX].AvcFlag = FALSE;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_MAX_SLEEP_INTERVAL_EXTENSION_INDEX     - MIB_TABLE_FIRST_INDEX].AvcFlag = FALSE;

        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_ENTITY_ID_INDEX  - MIB_TABLE_FIRST_INDEX].OptionType = OMCI_ME_ATTR_TYPE_MANDATORY;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_PWR_REDUCTION_MGMT_CAPABILITY_INDEX  - MIB_TABLE_FIRST_INDEX].OptionType = OMCI_ME_ATTR_TYPE_MANDATORY;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_PWR_REDUCTION_MGMT_MODE_INDEX  - MIB_TABLE_FIRST_INDEX].OptionType = OMCI_ME_ATTR_TYPE_MANDATORY;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_ITRANSINIT_INDEX  - MIB_TABLE_FIRST_INDEX].OptionType = OMCI_ME_ATTR_TYPE_MANDATORY;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_ITXINIT_INDEX  - MIB_TABLE_FIRST_INDEX].OptionType = OMCI_ME_ATTR_TYPE_MANDATORY;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_MAX_SLEEP_INTERVAL_INDEX  - MIB_TABLE_FIRST_INDEX].OptionType = OMCI_ME_ATTR_TYPE_MANDATORY;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_MIN_AWARE_INTERVAL_INDEX   - MIB_TABLE_FIRST_INDEX].OptionType = OMCI_ME_ATTR_TYPE_MANDATORY;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_MIN_ACTIVE_HELD_INTERVAL_INDEX     - MIB_TABLE_FIRST_INDEX].OptionType = OMCI_ME_ATTR_TYPE_MANDATORY;
        gMibOnuDynaPwrMgmtCtrlAttrInfo[MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_MAX_SLEEP_INTERVAL_EXTENSION_INDEX     - MIB_TABLE_FIRST_INDEX].OptionType = OMCI_ME_ATTR_TYPE_OPTIONAL;
    }
    
    memset(&(gMibOnuDynaPwrMgmtCtrlDefRow.EntityId), 0x00, sizeof(gMibOnuDynaPwrMgmtCtrlDefRow.EntityId));
    gMibOnuDynaPwrMgmtCtrlDefRow.PwrReductionMgmtCapability = ONU_PWR_CTRL_CAPABILITY_DOZE | ONU_PWR_CTRL_CAPABILITY_CYCLIC_SLEEP | ONU_PWR_CTRL_CAPABILITY_WATCHFUL_SLEEP;

    memset(&(gMibOnuDynaPwrMgmtCtrl2014DefRow.EntityId), 0x00, sizeof(gMibOnuDynaPwrMgmtCtrlDefRow.EntityId));
    gMibOnuDynaPwrMgmtCtrl2014DefRow.PwrReductionMgmtCapability = ONU_PWR_CTRL_CAPABILITY_DOZE | ONU_PWR_CTRL_CAPABILITY_CYCLIC_SLEEP | ONU_PWR_CTRL_CAPABILITY_WATCHFUL_SLEEP;
    gMibOnuDynaPwrMgmtCtrl2014DefRow.MissingConsecutiveBurstsThreshold = 4;

    memset(&gMibOnuDynaPwrMgmtCtrlOper, 0x0, sizeof(MIB_TABLE_OPER_T));
    gMibOnuDynaPwrMgmtCtrlOper.meOperDrvCfg = OnuDynaPwrMgmtCtrlDrvCfg;
    gMibOnuDynaPwrMgmtCtrlOper.meOperConnCheck = NULL;
    gMibOnuDynaPwrMgmtCtrlOper.meOperDump = omci_mib_oper_dump_default_handler;
    gMibOnuDynaPwrMgmtCtrlOper.meOperConnCfg = NULL;
    gMibOnuDynaPwrMgmtCtrlOper.meOperAvlTreeAdd = NULL;
    gMibOnuDynaPwrMgmtCtrlOper.meOperAvlTreeDel = NULL;
    gMibOnuDynaPwrMgmtCtrlOper.meOperAlarmHandler = NULL;

    MIB_TABLE_ONU_DYNA_PWR_MGMT_CTRL_INDEX = tableId;
    MIB_InfoRegister(tableId, &gMibOnuDynaPwrMgmtCtrlTableInfo, &gMibOnuDynaPwrMgmtCtrlOper);

    return GOS_OK;
}
